﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SSN.Objects;
using SSN.Security.Token;

namespace SSN.Utilities.Security {
	public class SystemSecurityContext:SSNSecurityContext {

		private string _userID;

		public SystemSecurityContext():this("SYSTEM") {}

		public SystemSecurityContext(string userID) {
			_userID=userID;
		}

		#region SSNSecurityContext Members

		public bool IsAuthenticated {
			get { return true; }
		}

		public bool IsInRole(string rolename) {
			return true;
		}

		public bool IsValid {
			get { return true; }
		}

		public SSNSecurityToken Token {
			get { return TokenFactory.createToken(this); }
		}

		public List<string> allRoles {
			get { return new List<string>(); }
		}

		public string userid {
			get { return _userID; }
		}

		#endregion
	}
}
